<div class="special-check-item-list main">
  <div class="content-container shadowbox">
    <div class="container-header"
      ng-click="specialCheckItemList.open()">
      <span>{{specialCheckItemList.specialCheckData.taskName}}</span>
      <span style="color: #e67054;font-size: 12px;margin-left: 10px;">{{specialCheckItemList.getCheckStatus()}}</span>
      <div class="score-outer">
        <span>得分:</span>
        <span class="score">{{specialCheckItemList.specialCheckData.totalScore}}</span>
        <span class="score-txt">分(百分制)</span>
      </div>
    </div>
    <div class="main-content">
      <div class="content-outline clear">
        <div class="outline-row">
          <span>考核项目:</span>
        </div>
        <div class="outline-row sub-row">
          <span class="row-label">内业:</span>
          <div class="sub-row-right">
            <span
              ng-if="!specialCheckItemList.specialCheckData.securityCheckClassifyMap.inner.length">
              无
            </span>
            <a class="pa-item-btn"
              ng-repeat="item in specialCheckItemList.specialCheckData.securityCheckClassifyMap.inner"
              ng-click="specialCheckItemList.openItemDetail(item)"
              ng-class="{'complete': item.check}">
                {{item.checkClassifyName}}
            </a>
          </div>
        </div>
        <div class="outline-row sub-row">
          <span class="row-label">外页:</span>
          <div class="sub-row-right">
            <span
              ng-if="!specialCheckItemList.specialCheckData.securityCheckClassifyMap.outer.length">
              无
            </span>
            <a class="pa-item-btn"
              ng-repeat="item in specialCheckItemList.specialCheckData.securityCheckClassifyMap.outer"
              ng-click="specialCheckItemList.openItemDetail(item)"
              ng-class="{'complete': item.check}">
              {{item.checkClassifyName}}
            </a>
          </div>
        </div>
        <div class="outline-row">
          <span class="row-label">实施标段:</span>
          <span>{{specialCheckItemList.specialCheckData.bidName}}</span>
        </div>
        <div class="outline-row">
          <span class="row-label">实施单位:</span>
          <span>{{specialCheckItemList.specialCheckData.carryOutOrg}}</span>
        </div>
        <div class="outline-row">
          <span class="row-label">检查时间:</span>
          <span>{{specialCheckItemList.specialCheckData.startDate1}}</span>
        </div>
        <div class="outline-row none-border">
          <span class="row-label">制定单位:</span>
          <span>{{specialCheckItemList.specialCheckData.madeOrg}}</span>
        </div>
        <a class="pa-item-btn" style="float: right;" 
          ng-if="specialCheckItemList.specialCheckData.status == 0 ||
            specialCheckItemList.specialCheckData.status == 1"
          ng-class="{'disabled': specialCheckItemList.isBtnDisabled()}"
          authorization-btn="api/securityActivities/specialCheck/startCheckById"
          ng-click="specialCheckItemList.changeTaskStatus()">
          {{specialCheckItemList.getBtnStatus()}}
        </a>
      </div>
      <div class="content-table">
        <div class="table-operation-bar">
          <!-- <div class="operantion-menu">
            <img src="../../../assets/images/speaker-icon.png" alt="">
            <span>通报</span>
          </div>
          <div class="operantion-menu">
            <img src="../../../assets/images/rectification-icon.png" alt="">
            <span>整改通知</span>
          </div>
          <div class="operantion-menu">
            <img src="../../../assets/images/fine-icon.png" alt="">
            <span>罚款通知</span>
          </div> -->
          <div class="operantion-menu"
            ng-if="specialCheckItemList.specialCheckData.status == 1 || specialCheckItemList.specialCheckData.status == 2"
            ng-click="$state.go('documentInside', {type: 'check', id: specialCheckItemList.id})">
            <img src="../../../assets/images/rectification-icon.png" alt="">
            <span>内业检查</span>
          </div>
        </div>
        <table class="pa-table">
          <thead>
            <tr>
              <th>违规项目</th>
              <th>处理方式</th>
              <th>当前状态</th>
              <th>要求整改时间</th>
              <th>问题说明</th>
              <th>问题位置</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <tr
              ng-repeat="item in specialCheckItemList.specialCheckList"
              >
              <td>{{item.checkClassifyName}}</td>
              <td>
                {{item.dealType == 0 ? '无问题' :
                item.dealType == 1 ? '限期整改' : 
                item.dealType == 2 ? '责令停工' : ''}}
              </td>
              <td 
              ng-class="{'has-complete':item.problemStatus == '2',
              'ongoing':item.problemStatus == '1',
              'after-rectify':item.problemStatus == '0'}">
                {{item.problemStatus == 0 ? '待整改' :
                item.problemStatus == 1 ? '待审核' : 
                item.problemStatus == 2 ? '已整改' : ''}}
              </td>
              <td>{{item.problemDeadline1}}</td>
              <td>{{item.problemDescription}}</td>
              <td>{{item.foundPlace}}</td>
              <td>
                <div class="del"
                  authorization-btn="api/securityActivities/checkProblem/queryCheckProblemById"
                  ng-click="$state.go('rectificationDetail', {type: 'problem',id: item.problemId})">
                  <i class="fa fa-street-view color"></i>
                  <span class="shoushi">查看</span>
                </div>                
              </td>
            </tr>
          </tbody>
        </table>
        <!-- 分页 -->
        <div class="pagination-outer">
          <uib-pagination
            total-items="specialCheckItemList.paginationData.total"
            ng-model="specialCheckItemList.paginationData.pageNum"
            items-per-page="specialCheckItemList.paginationData.pageSize"
            ng-change="pageChange()"
            class="pagination-sm"
            boundary-link-numbers="true"
            rotate="false"
            next-text="下一页"
            previous-text="上一页"></uib-pagination>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 内页外业的弹框 -->
<script type="text/ng-template" id="specialItemDetailDialog">
  <div class="item-detail-dialog specialCheck-dialog" >
    <div class="item-detail-dialog-header">
      <div class="title-txt">
        <span>{{vm.itemDetail1.checkClassifyName}}</span>
      </div>
    </div>
    <div class="item-detail-dialog-content">
      <div class="row-item">
        <div class="special-left-label">标准分：</div>
        <div class="special-right-value">
          <div class="line">
            {{vm.itemDetail1.standardScore}}分
          </div>
        </div>
      </div>
      <div class="row-item">
        <div class="special-left-label">考核内容：</div>
        <div class="special-right-value">
          <div class="line">
            {{vm.itemDetail1.checkContent}}
          </div>
        </div>
      </div>
      <div class="row-item">
        <div class="special-left-label">考核方法：</div>
        <div class="special-right-value">
          <div class="line">
            {{vm.itemDetail1.checkMethod}}
          </div>
        </div>
      </div>
      <div class="row-item">
        <div class="special-left-label">得分：</div>
        <div class="special-right-value">
          <div class="line">
            <span class="after-rectify"
              ng-if="vm.itemDetail1.check">
              {{vm.itemDetail1.checkClassifyScore}}分
            </span>
            <span ng-if="!vm.itemDetail1.check">未打分</span>
          </div>
        </div>
      </div>
    </div>
  </div> 
</script>
